package com.hn.mapper;


import com.hn.pojo.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface UserMapper {
    @Select("select * from user where id=#{id}")
    User selectById(Integer id);
    @Insert("insert into user values(null,#{age},#{name},#{password})")
    int insert(User user);
    @Delete("delete from user where id=#{id}")
    int deleteById(Integer id);
    @Select("select  * from user")
    List<User> list();
}
